// Copyright (C) ZHENG Zhong <heavyzheng nospam-at gmail D0T com>
// http://www.zhengzhong.net/
//
// $Id: exception.hpp 318 2009-03-02 14:03:21Z heavyzheng $
//

#ifndef ZZHENG_XML_XSLT_EXCEPTION_HPP_20090206__
#define ZZHENG_XML_XSLT_EXCEPTION_HPP_20090206__

#include <zzheng/xml/config.hpp>
#include <exception>
#include <string>

namespace zzheng {
namespace xml {
namespace xslt {

    ////////////////////////////////////////////////////////////////////////////////////////////////
    // xslt_error
    //

    //! This class represents an error related to XSLT.
    class xslt_error: public std::exception {

    public:

        //! Default constructor.
        explicit xslt_error(): what_() {
            // Do nothing.
        }

        explicit xslt_error(const char* what): what_(what) {
            // Do nothing.
        }

        virtual ~xslt_error() throw() {
            // Do nothing.
        }

        // Use auto-generated copy constructor.
        // Use auto-generated copy assignment.

        virtual const char* what() const throw() {
            return what_.c_str();
        }

    private:

        std::string what_;

    }; // class xslt_error

} // namespace zzheng::xml::xslt
} // namespace zzheng::xml
} // namespace zzheng

#endif // ZZHENG_XML_XSLT_EXCEPTION_HPP_20090206__



